package com.jzz.eletuanbackend.interceptors;

import com.jzz.eletuanbackend.service.AuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class LoginInterceptor extends BaseTokenInterceptor {

    @Autowired
    private AuthService authService;

    @Override
    boolean checkToken(String token) {
        return !authService.getUserId(token).isEmpty();
    }
}
